<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$id}</title>
	<include file="Public:header" />
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerForm.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerButton.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerRadio.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script> 
    <script src="__PUBLIC__/lib/ligerUI/js/plugins/ligerTip.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/jquery-validation/jquery.validate.min.js" type="text/javascript"></script> 
    <script src="__PUBLIC__/lib/jquery-validation/jquery.metadata.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/jquery-validation/messages_cn.js" type="text/javascript"></script>
    <script src="__PUBLIC__/lib/jquery.form.js" type="text/javascript"></script> 
    <script type="text/javascript"> 
        var groupicon = "__PUBLIC__/lib/ligerUI/skins/icons/communication.gif";
        $(function ()
        {
            //创建表单结构
            var mainform = $("#detailform");
              mainform.ligerForm({
                inputWidth: 170, labelWidth: 90, space: 40,
                fields: [
                { name: "id", type: "hidden" },
                { display: "标识", name: "name", newline: true, type: "text", validate: { required: true,minlength:3 }, group: "基础信息", groupicon: groupicon}, 
                { display: "名称", name: "title", newline: true, type: "text", validate: { required: true,minlength:3 }},
                { display: "状态", name: "status", newline: true, type: "select", comboboxName: "Name1", options: {valueFieldID: "status",data:[{text:"启用",id:"1"},{text:"禁用",id:"0"}]}},
                { display: "显示", name: "show", newline: true, type: "select", comboboxName: "Name2", options: {valueFieldID: "show",data:[{text:"启用",id:"1"},{text:"禁用",id:"0"}]}}
                ]
            });
                        
        });
                 
             
        function f_save(){
          	 $.post("__URL__/add/",$("#detailform").serialize(),function(data){
          		LG.showMessage(data, function () { 
        			window.parent.grid.loadData();
                    window.parent.mydialog.close(); //要先刷新表格,再关闭窗口,否则表格不会刷新 
                });
          	 });
           }
    </script> 

</head>
<body style="padding:10px"> 
    <form id="detailform">
    </form> 
 </body>
</html>